From: Dave Love Date: Thu, 23 Jan 2003 20:37:39 +0000 (+0000) Subject: (write-abbrev-file): Simplify, and put a coding cookie X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~28649 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=2089d187f11d9d82ded2587436058ec5a22e9b4b;p=emacs.git (write-abbrev-file): Simplify, and put a coding cookie in the file. --- diff --git a/lisp/abbrev.el b/lisp/abbrev.el index a73c8e0fe8d..8d9b7625128 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -212,15 +212,11 @@ The argument FILE is the file name to write." abbrev-file-name))) (or (and file (> (length file) 0)) (setq file abbrev-file-name)) - (save-excursion - (set-buffer (get-buffer-create " write-abbrev-file")) - (erase-buffer) - (let ((tables abbrev-table-name-list)) - (while tables - (insert-abbrev-table-description (car tables) nil) - (setq tables (cdr tables)))) - (write-region (point-min) (point-max) file) - (erase-buffer))) + (let ((coding-system-for-write 'emacs-mule)) + (with-temp-file file + (insert ";;-*-coding: emacs-mule;-*-\n") + (dolist (table abbrev-table-name-list) + (insert-abbrev-table-description table nil))))) (defun add-mode-abbrev (arg) "Define mode-specific abbrev for last word(s) before point.